home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / anivga12 / showpic.pas < prev    next >
Pascal/Delphi Source File  |  1993-07-11  |  995b  |  37 lines

  1. {$A+,B-,D+,L+,N-,E-,O-,R-,S-,V-,G-,F-,I-,X+}
  2. {$M 16384,0,655360}
  3. PROGRAM ShowPIC;
  4. USES ANIVGA,CRT;
  5. BEGIN
  6.  IF ParamCount=0
  7.   THEN BEGIN
  8.         WRITELN('Aehem, SIR, I need at least one filename...');
  9.         Halt(1)
  10.        END;
  11.  InitGraph;
  12.  SetBackgroundMode(STATIC);
  13.  LoadBackgroundPage(ParamStr(1));
  14.  IF Error<>Err_None
  15.   THEN BEGIN
  16.         CloseRoutines;
  17.         WRITELN(GetErrorMessage);
  18.        END
  19.   ELSE BEGIN
  20.         IF ParamCount=2
  21.          THEN BEGIN {palette given, too}
  22.                IF LoadPalette(ParamStr(2),0,actualColors)=0
  23.                 then BEGIN
  24.                       CloseRoutines;
  25.                       WRITELN('Couldn''t access file '+ParamStr(2)
  26.                               +' : '+GetErrorMessage);
  27.                       Halt
  28.                      END
  29.                 ELSE SetPalette(actualColors,TRUE);
  30.               END;
  31.         Animate;
  32.         WHILE KeyPressed DO ReadKey;
  33.         ReadKey;
  34.         CloseRoutines
  35.        END;
  36. END.
  37.